#include "epollServer.hpp"

#include <memory>

using namespace epoll_ns;

void Usage(const std::string &proc)
{
    std::cout << "Usage:\n\t" << proc << "port" << std::endl;
}

int main(int argc, char *argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }

    std::unique_ptr<EpollServer> epollsvr(new EpollServer(std::atoi(argv[1])));

    epollsvr->init();

    epollsvr->start();

    return 0;
}